(1) Field of the Invention
The present invention relates to a semiconductor device, a motor drive device, and an air conditioning machine, and particularly to a semiconductor device which generates a pulse width modulation signal for controlling an inverter circuit that drives a polyphase motor.
(2) Description of the Related Art
From the viewpoint of reduction in power consumption, inverters which drive high-efficient motors, such as brushless motors, with a given frequency have recently been in wide use. During the inverter control to drive a brushless motor, it is necessary to detect the position of a motor rotor. Conventionally, the position of a motor rotor is detected using a position sensor. In the case of detecting the position of a rotor using a position sensor, the problem is that a space to install a position sensor is required. Another problem is that the cost increases due to the necessity of such a space.
In order to overcome these problems, there is suggested a technology to perform Analogue-Digital (AD) conversion by sequentially detecting plural phase currents using a current detector instead of a position sensor, and to estimate the position of a rotor based on the result of the AD conversion (see Japanese Unexamined Application Publication No. 2003-189670).
In estimating the position of a rotor, the current detected by a current detector requires AD conversion, and therefore, time for AD conversion (also referred to as “AD conversion time”) needs to be secured by adjusting a timing to conduct each phase current. FIG. 1 shows the relationship, in a conventional three-phase motor drive device, between a carrier signal and pulse width modulation (PWM) control on phase currents U, V and W. The signals u, v and w which control phase currents U, V and W are generated based on the comparison between the carrier signal and respective comparison values x, y and z corresponding to the phase currents U, V and W. In the example shown in FIG. 1, a pulse of the signal u which controls U-phase rises first, and then, the signals v and w which control V-phase and W-phase rise.
For the sequential detection of the values of the currents conducted to the U-phase and W-phase using a current detector, it is necessary to perform AD conversion on the following currents respectively: a current detected by the current detector during the period in which only the U-phase is conducted; and a current detected during the period in which only the W-phase is conducted, that is, the period in which only the pulses of the signals u and v are ON. Therefore, in order to secure the time necessary for the AD conversion of the two currents, rising and falling timings of the pulses of the signals v and w are adjusted by a micro computer.
The micro computer performs AD conversion of the U-phase and W-phase in the first half of the carrier signal cycle by shifting the pulse for PWM control of the V-phase and W-phase, and calculates the position of the rotor based on the results of the AD conversion. Then, the micro computer sets the comparison values x, y and z of the next count cycle, and corrects the time to start AD conversion. In addition, the micro computer resets the comparison values x, y and z through an interruption process in the beginning of the latter half of the carrier signal cycle, so as to adjust the duty of the signal for the amount of time by which the rise of the pulse is shifted in the first half of the cycle.